package com.wn.common.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "饭店")
public class Resteraunt {
    private Integer id;

    @NotBlank(message = "饭店名称不能为空！")
    private String resName;

    @NotBlank(message = "所在地不可以为空！")

    private String resCityId;

    @Pattern(regexp = "(^0[0-9]{2,3}-[0-9]{7,8}$)|(^1[345678][0-9]{9}$)",message = "联系方式格式错误！")
    private String resTelphone;

    private String resComment;

    private Integer resProductId;
    //bigdecimal验证暂时无法解决
//    @NotBlank(message = "人均消费不能为空")
    private BigDecimal resPerFee;

    private String resDescription;

    private Integer createUserId;

    private Integer updateUserId;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private String createTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private String updateTime;

    private String isDeleted;

    private String resImages;

    private Integer status;

    private String resCity;

    private Float lng;

    private Float lat;

}
